<div class="hd-20160606">
    <div class="hd-banenr">
        <div class="banner-text">
            
        </div>
        <div class="hd-cupcode">
           
        </div>
    </div>
    

    <div class="hd-main-content">
        <div class="hd-control-block w1050" style="width: 1000px;">
            <ul class="block-list">
                <li>
                    <a href="#display1">MOBILE& TABLET</a>
                </li>
                <li>
                    <a href="#display2">WEARABLE TECHNOLOGY</a>
                </li>
                <li>
                    <a href="#display3"> SPORTS& OUTDOOR</a>
                </li>
                <li>
                    <a href="#display4">POWER BANK</a>
                </li>
            </ul>
            <div class="clearfloat"></div>
        </div>
        <div id="box">
            <div class="bg"></div>
            <div id="list">
                <ul>
                    <li class="hove">
                        <img src="../img/201606022.jpg" alt="IP65 128M/64M Zeblaze Crystal Smart Watch ">
                        <div><a href="#"></a></div>
                        <p class="b_tit">
                            <span class="opacity"></span>
                        </p>
                    </li>
                    <li>
                        <img src="../img/201606023.jpg" alt="Elephone ELE CAM Explorer 4K Sports Video Camera">
                        <div><a href="#"></a></div>
                        <p class="b_tit">
                            <span class="opacity"></span>
                        </p>
                    </li>
                    <li>
                        <img src="../img/201606024.jpg" alt="Elephone P9000 MTK6755 4GB 32GB  Wireless Charge">
                        <div><a href="#"></a></div>
                        <p class="b_tit">
                            <span class="opacity"></span>
                        </p>
                    </li>
                    <li>
                        <img src="../img/201606025.jpg" alt="Refurbished  iPhone 5S 16GB Sealed Box Phone grey">
                        <div><a href="#"></a></div>
                        <p class="b_tit">
                            <span class="opacity"></span>
                        </p>
                    </li>
                    <li>
                        <img src="../img/201606026.jpg" alt="PIPO Tablet PC Dual Boot Intel Z3735F Quad Core HD  Black">
                        <div><a href="#"></a></div>
                        <p class="b_tit">
                            <span class="opacity"></span>
                        </p>
                    </li>
                </ul>
            </div>
        </div>
        <div class="hd-display-block" id="display1">
            <h3>MOBILE& TABLET</h3>
            <div class="hd-product-list lists-15 w1050 clearfloat">
            </div>
            
        </div>

        <div class="hd-display-block" id="display2">
            <h3>WEARABLE TECHNOLOGY</h3>
            <div class="hd-product-list lists-15 w1050 clearfloat">
            </div>
           
        </div>

        <div class="hd-display-block" id="display3">
            <h3> SPORTS& OUTDOOR</h3>
            <div class="hd-product-list lists-15 w1050 clearfloat">
            </div>
        </div>

        <div class="hd-display-block" id="display4">
            <h3>POWER BANK</h3>
            <div class="hd-product-list lists-15 w1050 clearfloat">
            </div>
        </div>
        <div class="w1050">
            <div class="panel-layout">
                <ul>
                    <li>
                        <a href="#display1">MOBILE& TABLET</a>
                    </li>
                    <li>
                        <a href="#display2">WEARABLE TECHNOLOGY</a>
                    </li>
                    <li>
                        <a href="#display3">SPORTS& OUTDOOR</a>
                    </li>
                    <li>
                        <a href="#display4">POWER BANK</a>
                    </li>
                    <li>
                        <a id="hd-scrollTop" href="#Top"></a>
                    </li>
                </ul>
            </div>
        </div>
        
    </div>
</div>
<style>
    .hd-banenr .banner-text a{color: #02b717;}
    .hd-banenr .banner-text p{color: #666;}
    .hd-control-block{margin-top: 12px;}
    .hd-cupcode span label{font-weight: bold;color: #ff1a77;text-decoration: underline;}
    #box{width: 1145px;height: 329px;overflow: hidden;position: relative;margin:0px auto;}
    #list{width: 1140px;height: 329px;position: absolute;top:0;left: 50%;margin-left: -570px;}
    #list ul{margin: 0px;padding: 0px;float: left;}
    #list li{position: absolute;list-style-type: none;overflow: hidden;cursor: pointer;}
    #list li img{width: 100%;height: 100%;vertical-align: top;}
    #list li div{width: 100%;height: 100%;position: absolute;z-index: 1;top: 0px;left: 0px;}
    #list li div a{display: block;width: 100%;height: 100%;}
    .hd-product-list ul.lis1 li{width: 200px;height: 232px;}
    .hd-product-list ul.lis1 li:hover{border-color: #aaafb3;box-shadow: 0px 0px 16px #585858;-webkit-box-shadow: 0px 0px 16px #585858;-o-box-shadow: 0px 0px 16px #585858;-ms-box-shadow: 0px 0px 16px #585858;-moz-box-shadow: 0px 0px 16px #585858;}
    .hd-product-list ul.lis1 li:hover .review-wrapper p a{color: #d32f48;}
    .hd-product-list ul.lis1 li:nth-child(5n+5){margin-right: 0px;}
    .hd-product-list ul.lis1 li img{width: 180px;height: 158px;}
    .block-list li{height: 45px;background: rgba(209, 34, 67, 0.8);float: left;text-align: center;position: relative;width: -webkit-calc((100% - 3px)/4);width: -ms-calc((100% - 3px)/4);width: calc((100% - 3px)/4);width: -moz-calc((100% - 3px)/4);width: -o-calc((100% - 3px)/4);cursor: pointer;margin-right: 1px;}
    .block-list li a{font-size: 15px;color: #fff;line-height: 45px;display: block;height: 45px;}
    .block-list li a:hover{color: #feec76;}
    .block-list li:last-child{margin-right: 0px;border-right: none;}
    .hd-display-block h3{height: 135px;opacity: 0;}
    .hd-product-list ul li{margin: 0 10px 10px 0;background: #fff;overflow: hidden;text-align: center;position: relative;}
    #display1 {background: url(./images/201606021-2.jpg)no-repeat center top,url(./images/201606021-3.jpg)no-repeat center bottom;padding-top:100px;}
    #display1 .lis1:first-child {margin-top: 260px;}
    #display1 .lis1:nth-child(2) {margin-top: 195px;}
    #display1 .lis1:nth-child(3) {margin-top: 130px;}
    #display1 .lis1:nth-child(4) {margin-top: 65px;}
    #display2 {background: url(./images/201606021-4.jpg)no-repeat center top,url(./images/201606021-5.jpg)no-repeat center bottom;background-color: #F6911B;padding-bottom: 30px;}
    #display2 .lis1:last-child {margin-top: 220px;}
    #display2 .lis1:nth-child(4) {margin-top: 165px;}
    #display2 .lis1:nth-child(3) {margin-top: 110px;}
    #display2 .lis1:nth-child(2) {margin-top: 55px;}
    #display3 {background: url(./images/201606021-6.jpg)no-repeat center top ;padding-top: 130px;}
    #display4 {background: url(./images/201606021-7.jpg)no-repeat center top,url(./images/201606021-8.jpg)no-repeat center bottom;padding-top: 45px; background-color: #F16623;padding-bottom: 175px;}
    #display4 .lis1:last-child {margin-top: 220px;}
    #display4 .lis1:nth-child(4) {margin-top: 165px;}
    #display4 .lis1:nth-child(3) {margin-top: 110px;}
    #display4 .lis1:nth-child(2) {margin-top: 55px;}
    .hd-product-list ul li:hover img{opacity: 0.6;}
    .hd-product-list .price-area{float: left;}
    .hd-product-list .hd-btn-buy{font-size: 14px;color: #fff;display: block;background: #fe0000;padding: 4px 10px;position: absolute;right: 0;bottom: 0;}
    .hd-product-list .old-price{font-size: 14px;text-decoration: line-through;display: block;line-height: 15px;color: #333;padding-left:5px;}
    .hd-product-list .current-price{font-size: 20px;font-weight: bold;color: #ff0101;display: block;line-height: 22px;position: absolute;bottom: 5px;left: 5px;}
    .hd-product-list .review-wrapper p{text-align: center;line-height: 15px;height: 15px;overflow: hidden;margin-bottom: 12px;}
    .hd-product-list .review-wrapper .hd-btn-buy{font-size: 12px;color: #333;float: right;margin-top: 3px;text-decoration: underline;}
    .review-wrapper p a{font-size: 14px;color: #666;}
    .panel-layout ul li{margin-bottom: 4px;list-style: none;}
    .panel-layout ul li.current a{color: yellow;}
    .panel-layout ul li a{display: block;height: 26px;width: 100%;color: #fff;text-align: center;font-size: 12px;line-height: 26px;}
    #hd-scrollTop{display: block;height: 57px;opacity: 0;}
</style>
<script type="text/javascript">
    (function ($) {
        var marker = GetQueryString("marker"), bannerText = '',cupcode = '',style1 = '',style2 = '',style3 = '',style4 = '',style5 = '', style6 = '',style7 = '',style8 = '',style9 = '';
        if(marker == 'es'){
            bannerText = `<a href="#">Entrar en Geekvida.es >></a>
            <p class="text">Promoción：6 - 13 de junio</p>`;
            cupcode = `<span>Código:<label style="font-weight:bold;color: #ff1a77;">GV2YEAR</label></span>
            <p>CUPÓN PARA EL PEDIDO superior a 99€</p>`;
            style1 = '201606061';
            style2 = '600';
            style3 = '200';
            style4 = 'bottom: -5px; right: 0px; width: 100%;';
            style5 = 'border: 1px dashed #097DE2; padding: 5px 75px;';
            style6 = '201606027-1';
            style7 = '345';
            style8 = 'margin-top: 5px;';
            style9 = '175'
        }else if(marker == 'pw'){
            bannerText = `<a href="#">Enter Pandawil.com >></a>
            <p class="text">Valid until: June 13</p>`;
            cupcode = `<span>Coupon:<label>PW7YEAR</label></span>
            <p>(Not incl. Special Offer items)</p>`;
            style1 = '201606021-1';
            style2 = '545';
            style3 = '160';
            style4 = 'margin-top: 0px;background: #fff;bottom: 15px;right: 245px;border: 1px dashed #111111;padding: 10px;';
            style6 = '201606027';
            style7 = '385';
            style8 = 'margin-bottom: 0px;';
            style9 = '165'
        }else{

        }
        $(".banner-text").append(bannerText);
        $(".hd-cupcode").append(cupcode);
        $("style").append(`
        .hd-20160606{background: url(./images/${style1}.jpg)no-repeat center top #EEEEEE;min-width:1150px;}
        .hd-20160606 .hd-banenr{height: ${style2}px;position: relative;width: 1150px;margin: 0px auto}
        .hd-banenr .banner-text{position: absolute;right: 0px;font-size: 14px;width: ${style3}px;border: 1px solid #b5b3a0;background: #fff;padding-top: 5px;text-align: center;padding: 10px;box-shadow: 0px 0px 10px #847E7E;-webkit-box-shadow: 0px 0px 10px #847E7E;-ms-box-shadow: 0px 0px 10px #847E7E;-o-box-shadow: 0px 0px 10px #847E7E;}
        .hd-cupcode{ text-align: center; position: absolute;${style4}}
        .hd-cupcode span{font-size: 20px; color: #000; display: inline-block; ${style5}}
        .hd-cupcode p{ font-size: 15px; color: #666;${style8}}
        .panel-layout{background: url(./images/${style6}.png)no-repeat;width: 160px;height: ${style7}px;position: fixed;top: 0;margin-left: 1050px;display: none;}
        .panel-layout ul{margin-top: ${style9}px;}
        `);
        var str2 =  `<li>
                        <a href="#">
                            <img src="./images/2016040616.jpg" alt="Blackview Ultra A6 Plus 2GB 16GB Dorado">
                        </a>
                        <div class="review-wrapper">
                            <p>
                                <a href="#">Blackview Ultra A6 Plus 2GB 16GB Dorado</a>
                            </p>
                        </div>
                        <div class="price-area">
                            <span class="old-price">309.99€</span>
                            <span class="current-price">145.99€</span>
                        </div>
                        <a href="#" class="hd-btn-buy">Buy now&gt;&gt;</a>
                    </li>`;
        var str2_15_1 = '',str2_15_2 = '', str2_15_3 = '', str2_15_4 = '',str2_15_5 = '', str2_15 = '';
        for (var i = 0; i < 15; i++){
            if((i+5) % 5 == 0){
                str2_15_1 +=  str2;
                continue;
            }
            if((i+4) % 5 == 0){
                str2_15_2 +=  str2;
                continue;
            }
            if((i+3) % 5 == 0){
                str2_15_3 +=  str2;
                continue;
            }
            if((i+2) % 5 == 0){
                str2_15_4 +=  str2;
                continue;
            }
            if((i+1) % 5 == 0){
                str2_15_5 +=  str2;
                continue;
            }
            
        }
        str2_15 =  `<ul class="lis1 l">${str2_15_1}</ul>
                    <ul class="lis1 l">${str2_15_2}</ul>
                    <ul class="lis1 l">${str2_15_3}</ul>
                    <ul class="lis1 l">${str2_15_4}</ul>
                    <ul class="lis1 l">${str2_15_5}</ul>`;
          
        $(".lists-15").append(str2_15);
        var sideNav = $(".panel-layout");
        $(window).on("scroll", function () {
            var sideNavShow = $("#display1").offset().top;
            var modTop = [];
            if ($(this).scrollTop() >= sideNavShow) {
                sideNav.fadeIn(400);
            }
            else {
                sideNav.fadeOut(400);
            }

            /*滚动到哪个地方，相应的对方变换样式*/
            for (var i = 0; i < $(".panel-layout ul li a").length - 1; i++) {
                modTop[i] = $($(".panel-layout ul li a").eq(i).attr("href")).offset().top;

                if ($(window).scrollTop() >= modTop[i]) {
                    $(".panel-layout ul li").removeClass('current').eq(i).addClass('current');
                };
            };
        });

        sideNav.find("li").find("a").on("click", function (e) {
            e.preventDefault();
            var aHash = this.hash;
            $("html,body").animate({
                scrollTop: aHash == "#Top" ? 0 : $(aHash).offset().top
            });
        });

        function getClass(oParent, sClass) {
            var aElem = document.getElementsByTagName('*');
            var aClass = [];
            var i = 0;
            for (i = 0; i < aElem.length; i++)if (aElem[i].className == sClass) aClass.push(aElem[i]);
            return aClass;
        }
        function myAddEvent(obj, sEvent, fn) {
            if (obj.attachEvent) {
                obj.attachEvent('on' + sEvent, function () {
                    fn.call(obj);
                });
            } else {
                obj.addEventListener(sEvent, fn, false);
            }
        }
        function startMove(obj, json, fnEnd) {
            if (obj.timer) clearInterval(obj.timer);
            obj.timer = setInterval(function () {
                doMove(obj, json, fnEnd);
            }, 30);
        }
        function getStyle(obj, attr) {
            return obj.currentStyle ? obj.currentStyle[attr] : getComputedStyle(obj, false)[attr];
        }
        function doMove(obj, json, fnEnd) {
            var iCur = 0;
            var attr = '';
            var bStop = true;
            for (attr in json) {
                attr == 'opacity' ? iCur = parseInt(100 * parseFloat(getStyle(obj, 'opacity'))) : iCur = parseInt(getStyle(obj, attr));
                if (isNaN(iCur)) iCur = 0;
                if (navigator.userAgent.indexOf("MSIE 8.0") > 0) {
                    var iSpeed = (json[attr] - iCur) / 3;
                } else {
                    var iSpeed = (json[attr] - iCur) / 5;
                }
                iSpeed = iSpeed > 0 ? Math.ceil(iSpeed) : Math.floor(iSpeed);
                if (parseInt(json[attr]) != iCur) bStop = false;
                attr == 'zIndex' ? obj.style[attr] = iCur + iSpeed : obj.style[attr] = iCur + iSpeed + 'px';
            }
            if (bStop) {
                clearInterval(obj.timer);
                obj.timer = null;
                if (fnEnd) fnEnd();
            }
        }

        $(function () {
            var oBut = document.getElementById('list');
            var aLi = oBut.getElementsByTagName('li');
            var aA = oBut.getElementsByTagName('a');
            var aP = getClass(oBut, 'b_tit');
            var i = iNow = 0;
            var timer = null;
            var aSort = [];
            var aPosition = [
                { width: 220, height: 300, top: 16, left: 457, zIndex: 10 },
                { width: 220, height: 300, top: 16, left: 226, zIndex: 8 },
                { width: 215, height: 275, top: 41, left: 0, zIndex: 6 },
                { width: 215, height: 275, top: 41, left: 919, zIndex: 6 },
                { width: 220, height: 300, top: 16, left: 688, zIndex: 8 }
            ]
            for (i = 0; i < aLi.length; i++) {
                aLi[i].index = i;
                aLi[i].style.width = aPosition[i].width + 'px';
                aLi[i].style.height = aPosition[i].height + 'px';
                aLi[i].style.top = aPosition[i].top + 'px';
                aLi[i].style.left = aPosition[i].left + 'px';
                aLi[i].style.zIndex = aPosition[i].zIndex;
                aSort[i] = aPosition[i];
                myAddEvent(aLi[i], 'mouseover', function () {
                    var oDiv = this.getElementsByTagName('div')[0];
                    startMove(oDiv);
                });
                myAddEvent(aLi[i], 'mouseout', function () {
                    var oDiv = this.getElementsByTagName('div')[0];
                    startMove(oDiv);
                });
            }

            timer = setInterval(setInter, 4500);
            function setInter() {
                iNow++;
                if (iNow > aLi.length - 1) iNow = 0;
                tab();
            }
            function tab() {
                var iSort = iNow;
                Sort();
                for (i = 0; i < iSort; i++) {
                    aSort.unshift(aSort.pop());
                }
                sMove();
            }
            function Sort() {
                for (i = 0; i < aLi.length; i++) {
                    aSort[i] = aPosition[i];
                }
            }
            function sMove() {
                for (i = 0; i < aLi.length; i++) {
                    var oDiv = aLi[i].getElementsByTagName('div')[0];
                    startMove(oDiv);
                    startMove(aLi[i], aSort[i]);
                    aLi[i].className = '';
                }
                aLi[iNow].className = 'hove';
            }
        });
    })(jQuery);
</script>